package org.springblade.common.enums.item;

public enum ItemOperateType {
	ADD("新增", 1),
	DEL("删除", 2),
	WAREHOUSE("入库", 3),
	OUTSTOCK("出库", 4),
	RETURN("归还", 5),
	BORROW("借出", 6),
	DESTORY("销毁", 7),


	;

	private String value;
	private Integer code;


	ItemOperateType(String value, Integer code) {
		this.value = value;
		this.code = code;
	}

	public static String getTypeName(int code){
		for (ItemOperateType type:ItemOperateType.values()){
			if (type.getCode()==code) {
				return type.value;
			}
		}
		return null;
	}

	public String getValue() {
		return value;
	}


	public Integer getCode() {
		return code;
	}

}
